home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / OCEMailbox.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  55KB  |  1,418 lines

  1. /*
  2.      File:        OCEMailbox.h
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMaibox Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __OCEMAILBOX__
  19. #define __OCEMAILBOX__
  20.  
  21. #ifndef __OCE__
  22. #include <OCE.h>
  23. #endif
  24. #ifndef __OCEMAIL__
  25. #include <OCEMail.h>
  26. #endif
  27. #ifndef __OCEMESSAGING__
  28. #include <OCEMessaging.h>
  29. #endif
  30. #ifndef __OCESTANDARDMAIL__
  31. #include <OCEStandardMail.h>
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT_SUPPORTED
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_ALIGN_SUPPORTED
  43. #pragma options align=mac68k
  44. #endif
  45.  
  46. #if FOR_SYSTEM7_ONLY
  47. /* opaque references, iterators, and progress indicator */
  48. typedef struct OpaqueOpaqueMBMailboxRef* OpaqueMBMailboxRef;
  49. typedef struct OpaqueOpaqueMBContainerRef* OpaqueMBContainerRef;
  50. typedef struct OpaqueOpaqueMBMailboxIterator* OpaqueMBMailboxIterator;
  51. typedef struct OpaqueOpaqueMBMailItemIterator* OpaqueMBMailItemIterator;
  52. typedef struct OpaqueOpaqueMBProgressIndicator* OpaqueMBProgressIndicator;
  53. typedef struct OpaqueOpaqueMBCopyOperationRef* OpaqueMBCopyOperationRef;
  54. typedef struct OpaqueOpaqueMBNotificationRef* OpaqueMBNotificationRef;
  55. typedef OpaqueMBMailboxRef *MBMailboxRef;
  56. typedef OpaqueMBContainerRef *MBOpenContainerRef;
  57. typedef OpaqueMBMailboxIterator *MBMailboxIterator;
  58. typedef OpaqueMBMailItemIterator *MBMailItemIterator;
  59. typedef OpaqueMBProgressIndicator *MBProgressIndicator;
  60. typedef OpaqueMBCopyOperationRef *MBCopyOperationRef;
  61. typedef OpaqueMBNotificationRef *MBNotificationRef;
  62.  
  63. enum {
  64.     kMBMaxNumEnclosures            = 50
  65. };
  66.  
  67. /**********************************************************/
  68. /* Error codes, will be moved to OCEErrors.h */
  69. /***********************************************************/
  70.  
  71. enum {
  72.     kOCEIncompletedCallsErr        = -15069,                        /* calls operating within that container have not yet completed */
  73.     kOCEInvalidMBContainerTokenErr = -15070,                    /* the container token specified is invalid */
  74.     kOCERefExhaustedErr            = -15071,                        /* all reference slots have been used */
  75.     kOCEInvalidIteratorErr        = -15072,                        /* the Iterator specified is not valid */
  76.     kOCEItemAlreadyLocalErr        = -15073,                        /* the letter is already local */
  77.     kOCEIteratorOutOfRangeErr    = -15074,                        /* the iterator fell off the list of mail items */
  78.     kOCEInvalidSortOrder        = -15075,                        /* sort order is invalid or unsupported */
  79.     kOCEInvalidSortDirection    = -15076,                        /* sort direction is invalid or unsupported */
  80.     kOCEInvalidMailItemFilter    = -15077,                        /* filter is invalid or unsupported */
  81.     kOCECopyOperationCanceled    = -15078,                        /* copy operation is canceled */
  82.     kOCECopyAlreadyCompleted    = -15079,                        /* copy operation cannot be canceled because it is already finished */
  83.     kOCEInvalidContainerType    = -15080,                        /* the specified container type is invalid */
  84.     kOCECannotUnmountMailboxErr    = -15081,                        /* cannot unmount the mailbox */
  85.     kOCEInvalidLetterSpecErr    = -15082,                        /* letter spec is not valid */
  86.     kOCECannotCloseContainerErr    = -15083,                        /* cannot close the container */
  87.     kOCEFontNotDeclared            = -15084,                        /* cannot find font in font table */
  88.     kOCEFontTableNotFound        = -15085                        /* cannot find the font table in the letter */
  89. };
  90.  
  91. #define kOCENoProgressIndicator     ((MBProgressIndicator)0)
  92. /**********************************************************/
  93. /* Mailbox Gestalt Values */
  94. /**********************************************************/
  95.  
  96. enum {
  97.     gestaltOCEMailboxAPIAttr    = 'mbxa',
  98.     gestaltMailboxAPIPresent    = 0x01,                            /* Mailbox API is present */
  99.     gestaltSupportsOutbox        = 0x02,                            /* supports outbox access */
  100.     gestaltSupportsErrorLog        = 0x04                            /* supports mailbox error log */
  101. };
  102.  
  103. /**********************************************************/
  104. /* Mailbox Data Structures */
  105. /**********************************************************/
  106. typedef UInt32 MBMailboxToken;
  107. struct MBMailboxData {
  108.     MBMailboxToken                     mboxToken;
  109.     AuthIdentity                     authID;
  110.     OSType                             dataType;
  111.     OSType                             creator;
  112.     OSType                             dataClass;
  113.     MailTime                         modTime;
  114.     RString64                         name;
  115. };
  116. typedef struct MBMailboxData MBMailboxData;
  117.  
  118. /*     MBPermissions control whether other applications can detect that mailbox has been mounted */
  119. typedef UInt32 MBPermissions;
  120.  
  121. enum {
  122.     kMBPermissionsPublicMount    = 0x00000000,
  123.     kMBPermissionsPrivateMount    = 0x00000001
  124. };
  125.  
  126. /**********************************************************/
  127. /* Container Data Structures */
  128. /***********************************************************/
  129. /*
  130.     These structures are used to manipulate and list the mailbox containers. 
  131.     A container is a logical collection of mailbox items.  Examples of some 
  132.     standard containers are the inbox and the outbox. 
  133. */
  134. typedef UInt32 MBContainerType;
  135.  
  136. enum {
  137.     kMBUndefinedContainerType    = 0x00000000,
  138.     kMBInboxContainerType        = 'inbx',
  139.     kMBOutboxContainerType        = 'otbx'
  140. };
  141.  
  142. struct MBContainerToken {
  143.     UInt32                             reserved[3];
  144. };
  145. typedef struct MBContainerToken MBContainerToken;
  146.  
  147. typedef UInt32 MBContainerStatus;
  148.  
  149. enum {
  150.     kMBConnectionStatusUndefined = 0x00000000,
  151.     kMBContainerStatusConnected    = 0x00000001,
  152.     kMBContainerStatusNotConnected = 0x00000002
  153. };
  154.  
  155. typedef UInt32 MBContainerFlags;
  156.  
  157. enum {
  158.     kMBContainerLocal            = 0x00000000,
  159.     kMBContainerRemote            = 0x00000001,
  160.     kMBContainerLocalAndRemote    = 0x00000002
  161. };
  162.  
  163. typedef UInt32 MBContainerLocation;
  164.  
  165. enum {
  166.     kMBInboxContainerCreator    = 'ptps',
  167.     kMBOutboxContainerCreator    = 'ptps'
  168. };
  169.  
  170.  
  171. enum {
  172.     kMBContainerSystemClass        = 'sys ',
  173.     kMBContainerPMSAMClass        = 'pmsm',
  174.     kMBContainerUserClass        = 'user'
  175. };
  176.  
  177. typedef UInt32 MBContainerClass;
  178. struct MBContainerData {
  179.     MBContainerToken                 containerToken;
  180.     MBContainerToken                 reserved;
  181.     MBContainerLocation             location;
  182.     MBContainerStatus                 status;
  183.     MBContainerFlags                 capabilities[3];
  184.     OSType                             containerType;
  185.     OSType                             creator;
  186.     MBContainerClass                 containerClass;
  187.     RString64                         name;
  188. };
  189. typedef struct MBContainerData MBContainerData;
  190.  
  191. typedef UInt8 AddressAsType;
  192. /*
  193.      AddressAsType is actually an enumerated type and its constants
  194.     kAddressedAs_TO, kAddressedAs_CC, and kAddressedAs_BCC are
  195.     defined in OCEMail.h in an anonymous enum list. 
  196. */
  197. struct MBInboxLetterData {
  198.     MailSeqNum                         seqNum;
  199.     MailLetterFlags                 letterFlags;
  200.     UInt32                             approximateSize;            /* approximate size of letter         */
  201.     MailIndications                 indications;
  202.     OCECreatorType                     creatorType;
  203.     MailTime                         sendTime;                    /* time that message was sent        */
  204.     OSType                             family;
  205.     UInt8                             filler;
  206.     AddressAsType                     addressedToMe;                /* addressed as TO, CC or BCC         */
  207.     RString64                         sender;
  208.     RString64                         subject;                    /* subject is truncated              */
  209. };
  210. typedef struct MBInboxLetterData MBInboxLetterData;
  211.  
  212. struct MBOutboxLetterData {
  213.     MailSeqNum                         seqNum;
  214.     OSType                             family;                        /* family this message belongs to     */
  215.     OCECreatorType                     creatorType;
  216.     IPMMsgID                         messageID;
  217.     MailTime                         submitTime;
  218.     UInt32                             approximateSize;            /* approximate size of letter         */
  219.     UInt32                             recipientCount;                /* number of recipients of message     */
  220.     UInt32                             pendingRecipientCount;        /* number of recipients left to send by this slot */
  221.     PMSAMStatus                     state;
  222.     RString64                         subject;                    /* subject is truncated             */
  223. };
  224. typedef struct MBOutboxLetterData MBOutboxLetterData;
  225.  
  226. typedef UInt32 MBMailItemType;
  227.  
  228. enum {
  229.     kMBMailItemTypeUndefined    = 0x00000000,
  230.     kMBInboxLetter                = 0x00000001,
  231.     kMBOutboxLetter                = 0x00000002
  232. };
  233.  
  234. /* Filters for MBGetMailItemCount */
  235.  
  236. enum {
  237.     kMBNoFilterMask                = 0x00000000,
  238.     kMBInTrashFilterMask        = kMailInTrashMask
  239. };
  240.  
  241. typedef UInt32 MBMailItemFilter;
  242. struct MBMailItemData {
  243.     MBMailItemType                     itemType;
  244.     union {
  245.         MBInboxLetterData                 inboxLetter;
  246.         MBOutboxLetterData                 outboxLetter;
  247.     }                                 u;
  248. };
  249. typedef struct MBMailItemData MBMailItemData;
  250.  
  251. /* Used to mark an item read or unread using MBMarkLetter */
  252. typedef UInt32 MBLetterReadStatus;
  253.  
  254. enum {
  255.     kMBLeaveReadMark            = 0x00000000,
  256.     kMBMarkLetterRead            = 0x00000001,
  257.     kMBMarkLetterUnread            = 0x00000002
  258. };
  259.  
  260. /* Used to mark an item in or out of trash using MBMarkLetter */
  261. typedef UInt32 MBLetterTrashStatus;
  262.  
  263. enum {
  264.     kMBLeaveTrashMark            = 0x00000000,
  265.     kMBMarkLetterInTrash        = 0x00000001,
  266.     kMBMarkLetterNotInTrash        = 0x00000002
  267. };
  268.  
  269. /**********************************************************/
  270. /* Changes Enumeration Data Structures */
  271. /***********************************************************/
  272. typedef UInt32 MBMailItemChangeType;
  273.  
  274. enum {
  275.     kMBNoChange                    = 0x00000000,
  276.     kMBNewLetter                = 0x00000001,
  277.     kMBDeletedLetter            = 0x00000002,
  278.     kMBChangedLetter            = 0x00000004,
  279.     kMBAllChanges                = 0x7FFFFFFF
  280. };
  281.  
  282. typedef UInt32 MBNotificationMask;
  283.  
  284. enum {
  285.     kMBNoNotification            = 0x00000000,
  286.     kMBNotificationNewMailItem    = 0x00000001,
  287.     kMBNotificationDeletedMailItem = 0x00000002,
  288.     kMBNotificationChangedMailItem = 0x00000004,
  289.     kMBNotificationMBReset        = 0x00000008,                    /* must re-enumerate container contents */
  290.     kMBNotificationMailboxGoingAway = 0x00000010,
  291.     kMBNotificationMSAMError    = 0x00000020,
  292.     kMBIgnoreThisNotification    = 0x80000000,                    /* for future extensibility */
  293.     kMBAllNotifications            = 0x7FFFFFFF
  294. };
  295.  
  296. /***********************************************************/
  297. /* For mail item iterators */
  298. /***********************************************************/
  299. typedef UInt32 MBSortOrder;
  300.  
  301. enum {
  302.     kMBSortOrderMailSeqNum        = 0x00000001
  303. };
  304.  
  305. typedef UInt32 MBSortDirection;
  306.  
  307. enum {
  308.     kMBAscending                = 0
  309. };
  310.  
  311. /* forward declaration */
  312. typedef union MailboxParam MailboxParam;
  313. /*------------------------------------------------------------------------------*/
  314. /*     Parameter Blocks for the Operations                                        */
  315. /*------------------------------------------------------------------------------*/
  316. /**********************************************************/
  317. /* Mailbox Operations */
  318. /**********************************************************/
  319. /* Mounts the mailbox. Returns a mailboxRef which should be used on all future operations. */
  320. struct MBMountMailboxPB {
  321.     void *                            qLink;
  322.     SInt32                             reservedH1;
  323.     SInt32                             reservedH2;
  324.     MSAMIOCompletionUPP             ioCompletion;
  325.     OSErr                             ioResult;
  326.     SInt32                             saveA5;
  327.     SInt16                             reqCode;
  328.     AuthIdentity                     authID;                        /*  --> valid user authentication */
  329.     SInt32                             reserved1;                    /*  --> must be set to 0 */
  330.     UInt32                             reserved2;                    /*  --> must be set to 0 */
  331.     MBMailboxData *                    mailboxDataPtr;                /* <--> user supplied buffer for mailbox data */
  332.     MBMailboxRef                     mailboxRef;                    /* <--  allows user to access contents of the mailbox */
  333. };
  334. typedef struct MBMountMailboxPB MBMountMailboxPB;
  335.  
  336. /* Unmounts the Mailbox. After this call, the mailboxRef is no longer valid. */
  337. struct MBUnmountMailboxPB {
  338.     void *                            qLink;
  339.     SInt32                             reservedH1;
  340.     SInt32                             reservedH2;
  341.     MSAMIOCompletionUPP             ioCompletion;
  342.     OSErr                             ioResult;
  343.     SInt32                             saveA5;
  344.     SInt16                             reqCode;
  345.     MBMailboxRef                     mailboxRef;                    /*  --> ref of mailbox to unmount */
  346.     SInt32                             reserved;                    /*  --> must be set to 0 */
  347. };
  348. typedef struct MBUnmountMailboxPB MBUnmountMailboxPB;
  349.  
  350. /**********************************************************/
  351. /* Container and Mail Item Operations */
  352. /***********************************************************/
  353. /* Opens the container for use, returns a containerRef which should be used in all future Container operations */
  354. struct MBOpenContainerPB {
  355.     void *                            qLink;
  356.     SInt32                             reservedH1;
  357.     SInt32                             reservedH2;
  358.     MSAMIOCompletionUPP             ioCompletion;
  359.     OSErr                             ioResult;
  360.     SInt32                             saveA5;
  361.     SInt16                             reqCode;
  362.     MBMailboxRef                     mailboxRef;                    /*  --> authenticates client to access contents */
  363.     MBContainerToken                 containerToken;                /*  --> containerToken, persistent accross sessions */
  364.     MBOpenContainerRef                 containerRef;                /* <--  specifies the mounted mailbox we are dealing with */
  365. };
  366. typedef struct MBOpenContainerPB MBOpenContainerPB;
  367.  
  368. /* Closes the container and invalidates the containerRef */
  369. struct MBCloseContainerPB {
  370.     void *                            qLink;
  371.     SInt32                             reservedH1;
  372.     SInt32                             reservedH2;
  373.     MSAMIOCompletionUPP             ioCompletion;
  374.     OSErr                             ioResult;
  375.     SInt32                             saveA5;
  376.     SInt16                             reqCode;
  377.     MBOpenContainerRef                 containerRef;                /*  --> ref to container you wish to close */
  378.     Boolean                         forceClose;                    /*  --> true to close in spite of outstanding letters that have not been closed */
  379.     SInt8                             filler;
  380. };
  381. typedef struct MBCloseContainerPB MBCloseContainerPB;
  382.  
  383. /* Reconnect open container to remote service */
  384. struct MBReconnectOpenContainerPB {
  385.     void *                            qLink;
  386.     SInt32                             reservedH1;
  387.     SInt32                             reservedH2;
  388.     MSAMIOCompletionUPP             ioCompletion;
  389.     OSErr                             ioResult;
  390.     SInt32                             saveA5;
  391.     SInt16                             reqCode;
  392.     MBOpenContainerRef                 containerRef;                /*  --> the container ref to which to reconnect */
  393.     UInt32                             reserved1;                    /*  --> must be set to 0 */
  394.     UInt32                             reserved2;                    /*  --> must be set to 0 */
  395. };
  396. typedef struct MBReconnectOpenContainerPB MBReconnectOpenContainerPB;
  397.  
  398. /* Returns the mail item with the specified mail sequence number */
  399. struct MBGetMailItemDataPB {
  400.     void *                            qLink;
  401.     SInt32                             reservedH1;
  402.     SInt32                             reservedH2;
  403.     MSAMIOCompletionUPP             ioCompletion;
  404.     OSErr                             ioResult;
  405.     SInt32                             saveA5;
  406.     SInt16                             reqCode;
  407.     MBOpenContainerRef                 containerRef;                /*  --> ref to container from which you wish to get data */
  408.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the letter */
  409.     MBMailItemData *                dataPtr;                    /* <--> user supplied buffer where to copy data */
  410. };
  411. typedef struct MBGetMailItemDataPB MBGetMailItemDataPB;
  412.  
  413. /* Returns the number of items in the container (filtered, if specified) */
  414. struct MBGetMailItemCountPB {
  415.     void *                            qLink;
  416.     SInt32                             reservedH1;
  417.     SInt32                             reservedH2;
  418.     MSAMIOCompletionUPP             ioCompletion;
  419.     OSErr                             ioResult;
  420.     SInt32                             saveA5;
  421.     SInt16                             reqCode;
  422.     MBOpenContainerRef                 containerRef;                /*  --> container whose items are to be counted  */
  423.     MBMailItemFilter                 filter;                        /*  --> filter to apply when counting items     */
  424.     UInt32                             count;                        /* <--  number of items of that type in the container */
  425. };
  426. typedef struct MBGetMailItemCountPB MBGetMailItemCountPB;
  427.  
  428. /*
  429.  Allocates the memory and sets the Iterator to the first 
  430.    of the mail items of that type in the container. 
  431. */
  432. struct MBCreateMailItemIteratorPB {
  433.     void *                            qLink;
  434.     SInt32                             reservedH1;
  435.     SInt32                             reservedH2;
  436.     MSAMIOCompletionUPP             ioCompletion;
  437.     OSErr                             ioResult;
  438.     SInt32                             saveA5;
  439.     SInt16                             reqCode;
  440.     MBOpenContainerRef                 containerRef;                /*  --> ref of container where iterator should be set */
  441.     MBSortOrder                     sortOrder;                    /*  --> sort order */
  442.     MBSortDirection                 sortDirection;                /*  --> sort direction */
  443.     SInt32                             reserved[2];                /*  --> must be set to 0 */
  444.     MBMailItemIterator                 iterator;                    /* <--  iterator returned here, client allocates memory    */
  445. };
  446. typedef struct MBCreateMailItemIteratorPB MBCreateMailItemIteratorPB;
  447.  
  448. /* Dispose of the MBMailItemIterator */
  449. struct MBDisposeMailItemIteratorPB {
  450.     void *                            qLink;
  451.     SInt32                             reservedH1;
  452.     SInt32                             reservedH2;
  453.     MSAMIOCompletionUPP             ioCompletion;
  454.     OSErr                             ioResult;
  455.     SInt32                             saveA5;
  456.     SInt16                             reqCode;
  457.     MBMailItemIterator                 iterator;                    /*  --> the iterator to dispose of    */
  458. };
  459. typedef struct MBDisposeMailItemIteratorPB MBDisposeMailItemIteratorPB;
  460.  
  461. struct MBMailItemIteratePB {
  462.     void *                            qLink;
  463.     SInt32                             reservedH1;
  464.     SInt32                             reservedH2;
  465.     MSAMIOCompletionUPP             ioCompletion;
  466.     OSErr                             ioResult;
  467.     SInt32                             saveA5;
  468.     SInt16                             reqCode;
  469.     MBMailItemIterator                 iterator;                    /* <--> iterator to move                         */
  470.     MBMailItemData *                dataPtr;                    /* <--> user supplied buffer where to copy data */
  471. };
  472. typedef struct MBMailItemIteratePB MBMailItemIteratePB;
  473.  
  474. struct MBResetMailItemIteratorPB {
  475.     void *                            qLink;
  476.     SInt32                             reservedH1;
  477.     SInt32                             reservedH2;
  478.     MSAMIOCompletionUPP             ioCompletion;
  479.     OSErr                             ioResult;
  480.     SInt32                             saveA5;
  481.     SInt16                             reqCode;
  482.     MBMailItemIterator                 iterator;                    /* <--> mail item iterator to reset */
  483. };
  484. typedef struct MBResetMailItemIteratorPB MBResetMailItemIteratorPB;
  485.  
  486. /* MarkLetter Read/Unread and/or In Trash/Out of Trash. */
  487. struct MBMarkLetterPB {
  488.     void *                            qLink;
  489.     SInt32                             reservedH1;
  490.     SInt32                             reservedH2;
  491.     MSAMIOCompletionUPP             ioCompletion;
  492.     OSErr                             ioResult;
  493.     SInt32                             saveA5;
  494.     SInt16                             reqCode;
  495.     MBOpenContainerRef                 containerRef;                /*  --> container in which letter resides                      */
  496.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the letter                      */
  497.     MBLetterReadStatus                 readMark;                    /*  --> must be kMBLetterRead, kMBLetterUnread or kMBLeaveReadMark */
  498.     MBLetterTrashStatus             trashMark;                    /*  --> must be kMBLetterNotInTrash, kMBLetterInTrash or kMBLeaveTrashMark */
  499. };
  500. typedef struct MBMarkLetterPB MBMarkLetterPB;
  501.  
  502. /* Stores the MailItem locally. */
  503. struct MBCopyLocalPB {
  504.     void *                            qLink;
  505.     SInt32                             reservedH1;
  506.     SInt32                             reservedH2;
  507.     MSAMIOCompletionUPP             ioCompletion;
  508.     OSErr                             ioResult;
  509.     SInt32                             saveA5;
  510.     SInt16                             reqCode;
  511.     MBOpenContainerRef                 containerRef;                /*  --> container in which letter resides */
  512.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the desired letter */
  513.     MBProgressIndicator             progressIndicator;            /*  --> created using MBCreateProgressIndicatoror kOCENoProgressIndicator if client does not desire progress indication. */
  514.     MBCopyOperationRef                 copyOperationRef;            /* <--  ref to this copy operation for use in cancel */
  515.     MailSeqNum                         newSeqNum;                    /* <--  seqNum of new letter after successful operation */
  516. };
  517. typedef struct MBCopyLocalPB MBCopyLocalPB;
  518.  
  519. struct MBCopyToFilePB {
  520.     void *                            qLink;
  521.     SInt32                             reservedH1;
  522.     SInt32                             reservedH2;
  523.     MSAMIOCompletionUPP             ioCompletion;
  524.     OSErr                             ioResult;
  525.     SInt32                             saveA5;
  526.     SInt16                             reqCode;
  527.     MBOpenContainerRef                 containerRef;                /*  --> container in which letter resides */
  528.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the desired letter */
  529.     FSSpecPtr                         specPtr;                    /*  --> spec of file which will contain the local copy */
  530.     MBProgressIndicator             progressIndicator;            /*  --> created using MBCreateProgressIndicator or kOCENoProgressIndicator if client does not desire progress indication. */
  531.     MBCopyOperationRef                 copyOperationRef;            /* <--  ref to this copy operation for use in cancel */
  532. };
  533. typedef struct MBCopyToFilePB MBCopyToFilePB;
  534.  
  535. /* Cancels the copy operation, if possible. */
  536. struct MBCancelCopyPB {
  537.     void *                            qLink;
  538.     SInt32                             reservedH1;
  539.     SInt32                             reservedH2;
  540.     MSAMIOCompletionUPP             ioCompletion;
  541.     OSErr                             ioResult;
  542.     SInt32                             saveA5;
  543.     SInt16                             reqCode;
  544.     MBCopyOperationRef                 copyOperationRef;            /*  --> reference to copyLocal or copyToFile operation to cancel */
  545. };
  546. typedef struct MBCancelCopyPB MBCancelCopyPB;
  547.  
  548. /* An irrevocable delete of an item from a container. */
  549. struct MBDeleteLetterPB {
  550.     void *                            qLink;
  551.     SInt32                             reservedH1;
  552.     SInt32                             reservedH2;
  553.     MSAMIOCompletionUPP             ioCompletion;
  554.     OSErr                             ioResult;
  555.     SInt32                             saveA5;
  556.     SInt16                             reqCode;
  557.     MBOpenContainerRef                 containerRef;                /*  --> container in which letter resides              */
  558.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the letter to delete */
  559. };
  560. typedef struct MBDeleteLetterPB MBDeleteLetterPB;
  561.  
  562. /* Forces a MailItem to be sent right now. This operation only works on MailItems in the outbox.*/
  563. struct MBSendNowPB {
  564.     void *                            qLink;
  565.     SInt32                             reservedH1;
  566.     SInt32                             reservedH2;
  567.     MSAMIOCompletionUPP             ioCompletion;
  568.     OSErr                             ioResult;
  569.     SInt32                             saveA5;
  570.     SInt16                             reqCode;
  571.     MBOpenContainerRef                 containerRef;                /*  --> ref of the outbox container in which letter resides */
  572.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the letter to send             */
  573.     Duration                         timeOut;                    /*  --> time in seconds to wait for a response from server  */
  574. };
  575. typedef struct MBSendNowPB MBSendNowPB;
  576.  
  577. /**********************************************************/
  578. /* Notification and Changes Enumeration Operations */
  579. /***********************************************************/
  580. typedef pascal void (*MBNotificationProcPtr)(MBOpenContainerRef containerRef, MBNotificationMask actualChanges, void *contextPtr, MBMailItemData *item);
  581.  
  582. #if GENERATINGCFM
  583. typedef UniversalProcPtr MBNotificationUPP;
  584. #else
  585. typedef MBNotificationProcPtr MBNotificationUPP;
  586. #endif
  587. /* Allows a client to specify a callback routine and parameters. */
  588. struct MBRegisterNotificationPB {
  589.     void *                            qLink;
  590.     SInt32                             reservedH1;
  591.     SInt32                             reservedH2;
  592.     MSAMIOCompletionUPP             ioCompletion;
  593.     OSErr                             ioResult;
  594.     SInt32                             saveA5;
  595.     SInt16                             reqCode;
  596.     MBOpenContainerRef                 containerRef;                /*  --> container for which to receive notifications */
  597.     MBNotificationUPP                 handler;                    /*  --> UPP of callback to call when changes occur      */
  598.     MBNotificationMask                 mask;                        /*  --> which events should cause a notification      */
  599.     void *                            contextPtr;                    /*  --> pointer to client-defined buffer is passed to handler */
  600.     MBNotificationRef                 notificationRef;            /* <--  reference to the newly registered notification */
  601.     SInt32                             reserved;                    /*  --> must be set to 0 */
  602. };
  603. typedef struct MBRegisterNotificationPB MBRegisterNotificationPB;
  604.  
  605. /* Allows client to clear the callback info. */
  606. struct MBUnregisterNotificationPB {
  607.     void *                            qLink;
  608.     SInt32                             reservedH1;
  609.     SInt32                             reservedH2;
  610.     MSAMIOCompletionUPP             ioCompletion;
  611.     OSErr                             ioResult;
  612.     SInt32                             saveA5;
  613.     SInt16                             reqCode;
  614.     MBNotificationRef                 notificationRef;            /*  --> reference to the notification to unregister */
  615. };
  616. typedef struct MBUnregisterNotificationPB MBUnregisterNotificationPB;
  617.  
  618. /**********************************************************/
  619. /* Progress Indication Operations */
  620. /***********************************************************/
  621. /*
  622.  Creates a progress indicator for tracking progress of a copy operation from
  623.    MBCopyToFile or MBCopyLocal. 
  624. */
  625. struct MBCreateProgressIndicatorPB {
  626.     void *                            qLink;
  627.     SInt32                             reservedH1;
  628.     SInt32                             reservedH2;
  629.     MSAMIOCompletionUPP             ioCompletion;
  630.     OSErr                             ioResult;
  631.     SInt32                             saveA5;
  632.     SInt16                             reqCode;
  633.     MBProgressIndicator             progressIndicator;            /* <--  a progress indicator is returned here */
  634. };
  635. typedef struct MBCreateProgressIndicatorPB MBCreateProgressIndicatorPB;
  636.  
  637. /* Dispose the progress indicator that was previously allocated by MBCreateProgressIndicator. */
  638. struct MBDisposeProgressIndicatorPB {
  639.     void *                            qLink;
  640.     SInt32                             reservedH1;
  641.     SInt32                             reservedH2;
  642.     MSAMIOCompletionUPP             ioCompletion;
  643.     OSErr                             ioResult;
  644.     SInt32                             saveA5;
  645.     SInt16                             reqCode;
  646.     MBProgressIndicator             progressIndicator;            /*  --> the progress indicator to be destroyed */
  647. };
  648. typedef struct MBDisposeProgressIndicatorPB MBDisposeProgressIndicatorPB;
  649.  
  650. /*
  651.     Returns the current level of progress that has been completed.
  652.     The following fields can be polled during the the move in order to provide a "progress" 
  653.      indicator. The operation will be done when workCompleted equals totalWorkAmount. 
  654.     totalWorkAmount is pretty much a random number and is not an indication of the amount of 
  655.     work involved. 
  656. */
  657. struct MBGetCurrentProgressPB {
  658.     void *                            qLink;
  659.     SInt32                             reservedH1;
  660.     SInt32                             reservedH2;
  661.     MSAMIOCompletionUPP             ioCompletion;
  662.     OSErr                             ioResult;
  663.     SInt32                             saveA5;
  664.     SInt16                             reqCode;
  665.     MBProgressIndicator             progressIndicator;
  666.     UInt32                             totalWorkAmount;            /* <--  total amount of work that needs to be done, arbitrary units */
  667.     UInt32                             workCompleted;                /* <--  how much work was completed, between 0 and fTotalWorkAmount */
  668. };
  669. typedef struct MBGetCurrentProgressPB MBGetCurrentProgressPB;
  670.  
  671. /**********************************************************/
  672. /* Miscellaneous Operations */
  673. /***********************************************************/
  674. /* Returns the LetterSpec of a letter for use with Mailer APIs. */
  675. struct MBGetLetterSpecPB {
  676.     void *                            qLink;
  677.     SInt32                             reservedH1;
  678.     SInt32                             reservedH2;
  679.     MSAMIOCompletionUPP             ioCompletion;
  680.     OSErr                             ioResult;
  681.     SInt32                             saveA5;
  682.     SInt16                             reqCode;
  683.     MBOpenContainerRef                 containerRef;                /*  --> container within which the letter resides */
  684.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the letter */
  685.     LetterSpec *                    specPtr;                    /* <--> letter spec is returned here, client-supplied buffer */
  686. };
  687. typedef struct MBGetLetterSpecPB MBGetLetterSpecPB;
  688.  
  689. /* Obtain a mail sequence number and open container reference from a letter spec */
  690. struct MBConvertLetterSpecPB {
  691.     void *                            qLink;
  692.     SInt32                             reservedH1;
  693.     SInt32                             reservedH2;
  694.     MSAMIOCompletionUPP             ioCompletion;
  695.     OSErr                             ioResult;
  696.     SInt32                             saveA5;
  697.     SInt16                             reqCode;
  698.     LetterSpec *                    specPtr;                    /*  --> letter spec to convert                             */
  699.     MBOpenContainerRef                 containerRef;                /* <--  open container reference for input letter spec    */
  700.     MailSeqNum                         seqNum;                        /* <--  mail sequence number for input letter spec        */
  701. };
  702. typedef struct MBConvertLetterSpecPB MBConvertLetterSpecPB;
  703.  
  704. /* Returns the containerID given a well known container type */
  705. struct MBGetContainerTokenPB {
  706.     void *                            qLink;
  707.     SInt32                             reservedH1;
  708.     SInt32                             reservedH2;
  709.     MSAMIOCompletionUPP             ioCompletion;
  710.     OSErr                             ioResult;
  711.     SInt32                             saveA5;
  712.     SInt16                             reqCode;
  713.     MBMailboxRef                     mailboxRef;                    /*  --> the ref of the desired mailbox */
  714.     MBContainerType                 containerType;                /*  --> one of the well known container types */
  715.     MBContainerToken                 containerToken;                /* <--  the container Token returned here */
  716. };
  717. typedef struct MBGetContainerTokenPB MBGetContainerTokenPB;
  718.  
  719. /* Returns ContainerData for a given ContainerToken. */
  720. struct MBGetContainerDataFromTokenPB {
  721.     void *                            qLink;
  722.     SInt32                             reservedH1;
  723.     SInt32                             reservedH2;
  724.     MSAMIOCompletionUPP             ioCompletion;
  725.     OSErr                             ioResult;
  726.     SInt32                             saveA5;
  727.     SInt16                             reqCode;
  728.     MBMailboxRef                     mailboxRef;                    /*  --> the ref of the desired mailbox */
  729.     MBContainerToken                 containerToken;                /*  --> container you wish to get data from    */
  730.     MBContainerData *                dataPtr;                    /*  --> user supplied buffer where to write the data */
  731. };
  732. typedef struct MBGetContainerDataFromTokenPB MBGetContainerDataFromTokenPB;
  733.  
  734. /**********************************************************/
  735. /* Contents Operations */
  736. /***********************************************************/
  737. /* Opens a letter that is currently in a container. */
  738. struct MBOpenLetterPB {
  739.     void *                            qLink;
  740.     SInt32                             reservedH1;
  741.     SInt32                             reservedH2;
  742.     MSAMIOCompletionUPP             ioCompletion;
  743.     OSErr                             ioResult;
  744.     SInt32                             saveA5;
  745.     SInt16                             reqCode;
  746.     MBOpenContainerRef                 containerRef;                /*  --> open container where the letter resides     */
  747.     MailSeqNum                         seqNum;                        /*  --> mail sequence number of the desired letter     */
  748.     MailMsgRef                         msgRef;                        /* <--  the MailMsgRef authenticates the client to view the contents */
  749. };
  750. typedef struct MBOpenLetterPB MBOpenLetterPB;
  751.  
  752. /* Opens a letter that is currently on the disk. */
  753. struct MBOpenDiskLetterPB {
  754.     void *                            qLink;
  755.     SInt32                             reservedH1;
  756.     SInt32                             reservedH2;
  757.     MSAMIOCompletionUPP             ioCompletion;
  758.     OSErr                             ioResult;
  759.     SInt32                             saveA5;
  760.     SInt16                             reqCode;
  761.     FSSpec                             diskLetter;                    /*  --> the location of the mail item on disk */
  762.     MailMsgRef                         msgRef;                        /* <--  the MailMsgRef authenticates the client to view the contents */
  763. };
  764. typedef struct MBOpenDiskLetterPB MBOpenDiskLetterPB;
  765.  
  766. /* Closes a letter that is currently open. */
  767. struct MBCloseLetterPB {
  768.     void *                            qLink;
  769.     SInt32                             reservedH1;
  770.     SInt32                             reservedH2;
  771.     MSAMIOCompletionUPP             ioCompletion;
  772.     OSErr                             ioResult;
  773.     SInt32                             saveA5;
  774.     SInt16                             reqCode;
  775.     MailMsgRef                         msgRef;                        /*  --> mail sequence number of the letter to close */
  776. };
  777. typedef struct MBCloseLetterPB MBCloseLetterPB;
  778.  
  779. /* Opens a letter that is nested within another. */
  780. struct MBOpenNestedLetterPB {
  781.     void *                            qLink;
  782.     SInt32                             reservedH1;
  783.     SInt32                             reservedH2;
  784.     MSAMIOCompletionUPP             ioCompletion;
  785.     OSErr                             ioResult;
  786.     SInt32                             saveA5;
  787.     SInt16                             reqCode;
  788.     MailMsgRef                         msgRef;                        /*  --> MailMsgRef of the containing letter */
  789.     MailMsgRef                         nestedMsgRef;                /* <--  MailMsgRef of the nested letter */
  790. };
  791. typedef struct MBOpenNestedLetterPB MBOpenNestedLetterPB;
  792.  
  793. /* Returns the path where the enclosures of a certain letter are kept. */
  794. struct MBReadEnclosureFSSpecPB {
  795.     void *                            qLink;
  796.     SInt32                             reservedH1;
  797.     SInt32                             reservedH2;
  798.     MSAMIOCompletionUPP             ioCompletion;
  799.     OSErr                             ioResult;
  800.     SInt32                             saveA5;
  801.     SInt16                             reqCode;
  802.     MailMsgRef                         msgRef;                        /*  --> message for which to read enclosure information */
  803.     FSSpec                             enclosureDir;                /* <--  full path of directory where enclosures are stored */
  804. };
  805. typedef struct MBReadEnclosureFSSpecPB MBReadEnclosureFSSpecPB;
  806.  
  807. /* Returns the path where the content of a certain letter is kept. */
  808. struct MBReadContentFSSpecPB {
  809.     void *                            qLink;
  810.     SInt32                             reservedH1;
  811.     SInt32                             reservedH2;
  812.     MSAMIOCompletionUPP             ioCompletion;
  813.     OSErr                             ioResult;
  814.     SInt32                             saveA5;
  815.     SInt16                             reqCode;
  816.     MailMsgRef                         msgRef;                        /*  --> message for which to read the content */
  817.     FSSpec                             enclosureDir;                /* <--  full path and file name for main enclosure */
  818. };
  819. typedef struct MBReadContentFSSpecPB MBReadContentFSSpecPB;
  820.  
  821. /* Enumerates across the blocks of a letter. */
  822. struct MBEnumerateBlocksPB {
  823.     void *                            qLink;
  824.     SInt32                             reservedH1;
  825.     SInt32                             reservedH2;
  826.     MSAMIOCompletionUPP             ioCompletion;
  827.     OSErr                             ioResult;
  828.     SInt32                             saveA5;
  829.     SInt16                             reqCode;
  830.     MailMsgRef                         msgRef;                        /*  --> letter whose blocks are to be enumerated */
  831.     UInt16                             startIndex;                    /*  --> starting block index */
  832.     MailBuffer                         buffer;                        /* <--> user-allocated buffer where blocks are returned */
  833.     UInt16                             nextIndex;                    /* <--  Index of next block returned here */
  834.     Boolean                         more;                        /* <--  true if more blocks to process */
  835.     SInt8                             filler;
  836. };
  837. typedef struct MBEnumerateBlocksPB MBEnumerateBlocksPB;
  838.  
  839. /* Returns a buffer of all the recipients of a certain letter */
  840. struct MBReadRecipientsPB {
  841.     void *                            qLink;
  842.     SInt32                             reservedH1;
  843.     SInt32                             reservedH2;
  844.     MSAMIOCompletionUPP             ioCompletion;
  845.     OSErr                             ioResult;
  846.     SInt32                             saveA5;
  847.     SInt16                             reqCode;
  848.     MailMsgRef                         msgRef;                        /*  --> message about which to get recipient info */
  849.     MailAttributeID                 attrID;                        /*  --> type of recipient, kMailFromBit through kMailBccBit */
  850.     UInt16                             startIndex;                    /*  --> position in recipient list at which to begin, starts at 1 */
  851.     MailBuffer                         buffer;                        /* <--> buffer contains a Mail Reply. Each tuple is an OCEPackedRecipient. Each tuple is word aligned. */
  852.     UInt16                             nextIndex;                    /* <--  Index of next tuple that didn't fit in buffer */
  853.     Boolean                         more;                        /* <--  true if there are more recipient tuples to process */
  854.     SInt8                             filler;
  855. };
  856. typedef struct MBReadRecipientsPB MBReadRecipientsPB;
  857.  
  858. /* Reads the attributes of a letter as specified in the requestMask. */
  859. /*
  860.     buffer returned will contain the attribute values of 
  861.     the attributes indicated in responseMask, 
  862.     from the attribute indicated by the least significant bit set
  863.     to the attribute indicated by the most significant bit set.
  864.     Note that recipients - from, to, cc, bcc cannot be read using
  865.     this call. Use GetRecipients to read these.
  866. */
  867. struct MBReadAttributesPB {
  868.     void *                            qLink;
  869.     SInt32                             reservedH1;
  870.     SInt32                             reservedH2;
  871.     MSAMIOCompletionUPP             ioCompletion;
  872.     OSErr                             ioResult;
  873.     SInt32                             saveA5;
  874.     SInt16                             reqCode;
  875.     MailMsgRef                         msgRef;                        /*  --> letter whose attributes you wish to get */
  876.     MailAttributeBitmap             requestMask;                /*  --> which attributes to get, kMailIndicationsBit through kMailSubjectBit */
  877.     MailBuffer                         buffer;                        /* <--> attributes returned in this user supplied buffer */
  878.     MailAttributeBitmap             responseMask;                /* <-- returns bits of those attributes that were returned */
  879.     Boolean                         more;                        /* <-- true if there are more recipient tuples to process */
  880.     SInt8                             filler;
  881. };
  882. typedef struct MBReadAttributesPB MBReadAttributesPB;
  883.  
  884. /* Reads the block of a letter. */
  885. struct MBReadBlockPB {
  886.     void *                            qLink;
  887.     SInt32                             reservedH1;
  888.     SInt32                             reservedH2;
  889.     MSAMIOCompletionUPP             ioCompletion;
  890.     OSErr                             ioResult;
  891.     SInt32                             saveA5;
  892.     SInt16                             reqCode;
  893.     MailMsgRef                         msgRef;                        /*  --> letter whose blocks you wish to read */
  894.     OCECreatorType                     blockType;                    /*  --> specifies creator and type of the block to read */
  895.     UInt16                             blockIndex;                    /*  --> relative position of the block of that type to read */
  896.     MailBuffer                         buffer;                        /* <--> user suppied buffer to reciev the information */
  897.     UInt32                             dataOffset;                    /*  --> byte offset within the block at which to start reading */
  898.     Boolean                         endOfBlock;                    /* <--  indicates whether the call has returned the entire block */
  899.     SInt8                             filler;
  900.     UInt32                             remaining;                    /* <--  number of bytes of data remaining in the block */
  901. };
  902. typedef struct MBReadBlockPB MBReadBlockPB;
  903.  
  904. /* Returns a SignatureContext that can be used to verify a signature. */
  905. struct MBVerifySignaturePB {
  906.     void *                            qLink;
  907.     SInt32                             reservedH1;
  908.     SInt32                             reservedH2;
  909.     MSAMIOCompletionUPP             ioCompletion;
  910.     OSErr                             ioResult;
  911.     SInt32                             saveA5;
  912.     SInt16                             reqCode;
  913.     MailMsgRef                         msgRef;                        /*  --> letter containing the signature to verify */
  914.     SIGContextPtr                     signatureContext;            /*  --> previously obtained signature context */
  915. };
  916. typedef struct MBVerifySignaturePB MBVerifySignaturePB;
  917.  
  918. /* Creates a letter given the relevant info about the letter. */
  919. struct MBCreateLetterPB {
  920.     void *                            qLink;
  921.     SInt32                             reservedH1;
  922.     SInt32                             reservedH2;
  923.     MSAMIOCompletionUPP             ioCompletion;
  924.     OSErr                             ioResult;
  925.     SInt32                             saveA5;
  926.     SInt16                             reqCode;
  927.     MailMsgRef                         msgRef;                        /* <--  MailMsgRef of the letter just created */
  928.     AuthIdentity                     senderIdentity;                /*  --> authenticated identity of the sender  */
  929.     IPMMsgType                         msgType;                    /*  --> type, creator, and class of the sending application */
  930.     Boolean                         diskForm;                    /*  --> true to create letter on disk, otherwise in the outbox */
  931.     SInt8                             filler;
  932.     FSSpec                             diskLetter;                    /*  --> diskForm is true, it specifies where to create the letter */
  933.     Boolean                         bccRecipients;                /*  --> set to true if creating letter with bcc recipients */
  934.     SInt8                             filler2;
  935. };
  936. typedef struct MBCreateLetterPB MBCreateLetterPB;
  937.  
  938. /* Submits a letter for processing. */
  939. struct MBSubmitLetterPB {
  940.     void *                            qLink;
  941.     SInt32                             reservedH1;
  942.     SInt32                             reservedH2;
  943.     MSAMIOCompletionUPP             ioCompletion;
  944.     OSErr                             ioResult;
  945.     SInt32                             saveA5;
  946.     SInt16                             reqCode;
  947.     MailMsgRef                         msgRef;                        /*  --> ref to the letter that you wish to submit */
  948.     Boolean                         submitFlag;                    /*  --> throw letter away if submitFlag is false */
  949.     SInt8                             filler;
  950.     MailLetterID                     letterID;                    /* <--  persistent ID of the letter    accross the whole system */
  951.     SIGSignaturePtr                 signaturePtr;                /*  --> pointer to digital signature */
  952.     Size                             signatureSize;                /*  --> size of the digital signature */
  953.     SIGContextPtr                     signatureContext;            /*  --> pointer to the signature context */
  954. };
  955. typedef struct MBSubmitLetterPB MBSubmitLetterPB;
  956.  
  957. /* Begin a nested mail item within some mail item. */
  958. struct MBBeginNestedLetterPB {
  959.     void *                            qLink;
  960.     SInt32                             reservedH1;
  961.     SInt32                             reservedH2;
  962.     MSAMIOCompletionUPP             ioCompletion;
  963.     OSErr                             ioResult;
  964.     SInt32                             saveA5;
  965.     SInt16                             reqCode;
  966.     MailMsgRef                         msgRef;                        /*  --> the letter within which you wish to nest */
  967.     SInt32                             reserved;                    /*  --> must be set to NIL */
  968.     IPMMsgType                         msgType;                    /*  --> creator and type of the nested message to create */
  969. };
  970. typedef struct MBBeginNestedLetterPB MBBeginNestedLetterPB;
  971.  
  972. /* End the nested mail item. This function is always executed synchronously. */
  973. struct MBEndNestedLetterPB {
  974.     void *                            qLink;
  975.     SInt32                             reservedH1;
  976.     SInt32                             reservedH2;
  977.     MSAMIOCompletionUPP             ioCompletion;
  978.     OSErr                             ioResult;
  979.     SInt32                             saveA5;
  980.     SInt16                             reqCode;
  981.     MailMsgRef                         msgRef;                        /*  --> the message containing the nested letter to end */
  982. };
  983. typedef struct MBEndNestedLetterPB MBEndNestedLetterPB;
  984.  
  985. /* Add attributes to a mail item. */
  986. struct MBAddAttributePB {
  987.     void *                            qLink;
  988.     SInt32                             reservedH1;
  989.     SInt32                             reservedH2;
  990.     MSAMIOCompletionUPP             ioCompletion;
  991.     OSErr                             ioResult;
  992.     SInt32                             saveA5;
  993.     SInt16                             reqCode;
  994.     MailMsgRef                         msgRef;                        /*  --> the letter to wich you wish to add an attribute */
  995.     MailAttributeID                 attrID;                        /*  --> the type of attribute to add */
  996.     MailBuffer                         buffer;                        /* <--> attributes stored in buffer are copied to the mail item */
  997. };
  998. typedef struct MBAddAttributePB MBAddAttributePB;
  999.  
  1000. /* Adds an enclosure to a mail item. This function is always executed synchronously. */
  1001. struct MBAddEnclosurePB {
  1002.     void *                            qLink;
  1003.     SInt32                             reservedH1;
  1004.     SInt32                             reservedH2;
  1005.     MSAMIOCompletionUPP             ioCompletion;
  1006.     OSErr                             ioResult;
  1007.     SInt32                             saveA5;
  1008.     SInt16                             reqCode;
  1009.     MailMsgRef                         msgRef;                        /*  --> the letter to wich you wish to add an enclosure */
  1010.     Boolean                         contentEnclosure;            /*  --> whethet this enclosure contains the main content of the mail */
  1011.     SInt8                             filler;
  1012.     Boolean                         hfs;                        /*  --> true if in the file system, false if in memory */
  1013.     Boolean                         append;                        /*  --> whether to append data in buffer to current enclosure */
  1014.     MailBuffer                         buffer;                        /* <--> unused if hfs is true, otherwise it contains the file's resource and data forks */
  1015.     FSSpec                             enclosure;                    /*  --> specifies the file or folder you wish to enclose */
  1016.     MailEnclosureInfo                 addlInfo;                    /*  --> specifies file system info for the enclosure */
  1017. };
  1018. typedef struct MBAddEnclosurePB MBAddEnclosurePB;
  1019.  
  1020. /* Adds a block to a mail item. */
  1021. struct MBAddBlockPB {
  1022.     void *                            qLink;
  1023.     SInt32                             reservedH1;
  1024.     SInt32                             reservedH2;
  1025.     MSAMIOCompletionUPP             ioCompletion;
  1026.     OSErr                             ioResult;
  1027.     SInt32                             saveA5;
  1028.     SInt16                             reqCode;
  1029.     MailMsgRef                         msgRef;                        /*  --> the message to wich you wish to add a block */
  1030.     SInt32                             refCon;                        /*  --> reserved for your use */
  1031.     OCECreatorType                     blockType;                    /*  --> creator and type of the block that you want to write */
  1032.     Boolean                         append;                        /*  --> whether to append the data in you buffer to the current block */
  1033.     SInt8                             filler;
  1034.     MailBuffer                         buffer;                        /* <--> stores the data you want to write to the message */
  1035.     MailBlockMode                     mode;                        /*  --> if blockType is kMailTunnelLtrType or kMailHopInfoType mode is assumed to be kMailFromMark  */
  1036.     UInt32                             offset;                        /*  --> offset to use to determine the starting point of the write set to 0 to start new block, ignored when append is false */
  1037. };
  1038. typedef struct MBAddBlockPB MBAddBlockPB;
  1039.  
  1040. /* Adds a letter to another one. */
  1041. struct MBAddLetterPB {
  1042.     void *                            qLink;
  1043.     SInt32                             reservedH1;
  1044.     SInt32                             reservedH2;
  1045.     MSAMIOCompletionUPP             ioCompletion;
  1046.     OSErr                             ioResult;
  1047.     SInt32                             saveA5;
  1048.     SInt16                             reqCode;
  1049.     MailMsgRef                         newMsgRef;                    /*  --> the new letter you are composing */
  1050.     MailMsgRef                         msgRef;                        /*  --> the original letter you want to add to the new letter */
  1051. };
  1052. typedef struct MBAddLetterPB MBAddLetterPB;
  1053.  
  1054. /* Adds content to a mail item. */
  1055. struct MBAddContentPB {
  1056.     void *                            qLink;
  1057.     SInt32                             reservedH1;
  1058.     SInt32                             reservedH2;
  1059.     MSAMIOCompletionUPP             ioCompletion;
  1060.     OSErr                             ioResult;
  1061.     SInt32                             saveA5;
  1062.     SInt16                             reqCode;
  1063.     MailMsgRef                         msgRef;                        /*  --> message from which to add some content */
  1064.     MailSegmentType                 segmentType;                /*  --> segment type of data tou want to write */
  1065.     Boolean                         append;                        /*  --> whether to copy data from buffer into mail item */
  1066.     SInt8                             filler;
  1067.     MailBuffer                         buffer;                        /* <--> place the data in this buffer */
  1068.     StScrpRec *                        textScrap;                    /*  --> a pointer to a style scrap structure */
  1069.     Boolean                         startNewScript;                /*  --> whether the data in buffer uses a new character set */
  1070.     SInt8                             filler2;
  1071.     ScriptCode                         script;                        /*  --> valid only if startNewScript is true */
  1072. };
  1073. typedef struct MBAddContentPB MBAddContentPB;
  1074.  
  1075. /* Reads the content of a mail item. */
  1076. struct MBReadContentPB {
  1077.     void *                            qLink;
  1078.     SInt32                             reservedH1;
  1079.     SInt32                             reservedH2;
  1080.     MSAMIOCompletionUPP             ioCompletion;
  1081.     OSErr                             ioResult;
  1082.     SInt32                             saveA5;
  1083.     SInt16                             reqCode;
  1084.     MailMsgRef                         msgRef;                        /*  --> message from which to read the content */
  1085.     MailSegmentMask                 segmentMask;                /*  --> the types of segments that you want to read */
  1086.     MailBuffer                         buffer;                        /* <--> user suppiled buffer into which to write the segment */
  1087.     StScrpRec *                        textScrap;                    /* <--> a pointer to a style scrap structure */
  1088.     ScriptCode                         script;                        /* <--  the character set of the text placed in your buffer */
  1089.     MailSegmentType                 segmentType;                /* <--  the type of the current data segment */
  1090.     Boolean                         endOfScript;                /* <--  whether the text in your buffer is the end of a script run */
  1091.     Boolean                         endOfSegment;                /* <--  whether we reached the end of a segment */
  1092.     Boolean                         endOfContent;                /* <--  whether we reached the end of the letter's content block */
  1093.     SInt8                             filler;
  1094.     SInt32                             segmentLength;                /* <--  number of bytes in the current segment */
  1095.     SInt32                             segmentID;                    /* <--> segment identifier */
  1096. };
  1097. typedef struct MBReadContentPB MBReadContentPB;
  1098.  
  1099. /* Adds another recipient to a mail item. */
  1100. struct MBAddRecipientPB {
  1101.     void *                            qLink;
  1102.     SInt32                             reservedH1;
  1103.     SInt32                             reservedH2;
  1104.     MSAMIOCompletionUPP             ioCompletion;
  1105.     OSErr                             ioResult;
  1106.     SInt32                             saveA5;
  1107.     SInt16                             reqCode;
  1108.     MailMsgRef                         msgRef;                        /*  --> message to which to add recipient information */
  1109.     MailAttributeID                 attrID;                        /*  --> type of recipient to add to the message */
  1110.     MailRecipient *                    recipient;                    /*  --> where you provide complete addressing information about recipient */
  1111.     Boolean                         invalid;                    /*  --> Must be set to false */
  1112.     SInt8                             filler;
  1113. };
  1114. typedef struct MBAddRecipientPB MBAddRecipientPB;
  1115.  
  1116. /* Gets a font name from the letter, given a font number */
  1117. struct MBGetFontNameFromLetterPB {
  1118.     void *                            qLink;
  1119.     SInt32                             reservedH1;
  1120.     SInt32                             reservedH2;
  1121.     MSAMIOCompletionUPP             ioCompletion;
  1122.     OSErr                             ioResult;
  1123.     SInt32                             saveA5;
  1124.     SInt16                             reqCode;
  1125.     MailMsgRef                         msgRef;                        /*  --> letter reference from which to get font table */
  1126.     SInt16                             fontNum;                    /*  --> font number to obtain name of */
  1127.     SInt16                             filler;
  1128.     StringPtr                         fontName;                    /* <--> user supplied buffer to be filled with font name */
  1129.  
  1130. };
  1131. typedef struct MBGetFontNameFromLetterPB MBGetFontNameFromLetterPB;
  1132.  
  1133. union MailboxParam {
  1134.     struct {
  1135.         void *                            qLink;
  1136.         SInt32                             reservedH1;
  1137.         SInt32                             reservedH2;
  1138.         MSAMIOCompletionUPP             ioCompletion;
  1139.         OSErr                             ioResult;
  1140.         SInt32                             saveA5;
  1141.         SInt16                             reqCode;
  1142.     }                                 header;
  1143.  
  1144.                                                                 /* Mailbox Operations */
  1145.     MBMountMailboxPB                 mountMailboxPB;
  1146.     MBUnmountMailboxPB                 unmountMailboxPB;
  1147.  
  1148.                                                                 /* Container and Letter Operations */
  1149.     MBOpenContainerPB                 openContainerPB;
  1150.     MBCloseContainerPB                 closeContainerPB;
  1151.     MBReconnectOpenContainerPB         reconnectOpenContainerPB;
  1152.     MBGetMailItemDataPB             getMailItemDataPB;
  1153.     MBGetMailItemCountPB             getMailItemCountPB;
  1154.     MBCreateMailItemIteratorPB         createMailItemIteratorPB;
  1155.     MBDisposeMailItemIteratorPB     disposeMailItemIteratorPB;
  1156.     MBMailItemIteratePB             mailItemIteratePB;
  1157.     MBResetMailItemIteratorPB         resetMailItemIteratorPB;
  1158.     MBMarkLetterPB                     markLetterPB;
  1159.     MBCopyLocalPB                     copyLocalPB;
  1160.     MBCopyToFilePB                     copyToFilePB;
  1161.     MBCancelCopyPB                     cancelCopyPB;
  1162.     MBDeleteLetterPB                 deleteLetterPB;
  1163.     MBSendNowPB                     sendNowPB;
  1164.  
  1165.                                                                 /* Notification and Changes Iterator Operations */
  1166.     MBRegisterNotificationPB         registerNotificationPB;
  1167.     MBUnregisterNotificationPB         unregisterNotificationPB;
  1168.  
  1169.                                                                 /* Progress Indicator Operations */
  1170.     MBCreateProgressIndicatorPB     createProgressIndicatorPB;
  1171.     MBDisposeProgressIndicatorPB     disposeProgressIndicatorPB;
  1172.     MBGetCurrentProgressPB             getCurrentProgressPB;
  1173.  
  1174.                                                                 /* Miscellaneous Operations */
  1175.     MBGetLetterSpecPB                 getLetterSpecPB;
  1176.     MBConvertLetterSpecPB             convertLetterSpecPB;
  1177.     MBGetContainerTokenPB             getContainerTokenPB;
  1178.     MBGetContainerDataFromTokenPB     getContainerDataFromTokenPB;
  1179.  
  1180.                                                                 /* Contents Operations */
  1181.     MBOpenLetterPB                     openLetterPB;
  1182.     MBOpenDiskLetterPB                 openDiskLetterPB;
  1183.     MBCloseLetterPB                 closeLetterPB;
  1184.     MBOpenNestedLetterPB             openNestedLetterPB;
  1185.     MBReadEnclosureFSSpecPB         readEnclosureFSSpecPB;
  1186.     MBReadContentFSSpecPB             readContentFSSpecPB;
  1187.     MBEnumerateBlocksPB             enumerateBlocksPB;
  1188.     MBReadRecipientsPB                 readRecipientsPB;
  1189.     MBReadAttributesPB                 readAttributesPB;
  1190.     MBReadBlockPB                     readBlockPB;
  1191.     MBVerifySignaturePB             verifySignaturePB;
  1192.     MBCreateLetterPB                 createLetterPB;
  1193.     MBSubmitLetterPB                 submitLetterPB;
  1194.     MBBeginNestedLetterPB             beginNestedLetterPB;
  1195.     MBEndNestedLetterPB             endNestedLetterPB;
  1196.     MBAddAttributePB                 addAttributePB;
  1197.     MBAddEnclosurePB                 addEnclosurePB;                /* this variant is SYSTEM8_DEPRECATED*/
  1198.     MBAddBlockPB                     addBlockPB;
  1199.     MBAddLetterPB                     addLetterPB;
  1200.     MBAddContentPB                     addContentPB;
  1201.     MBReadContentPB                 readContentPB;
  1202.     MBAddRecipientPB                 addRecipientPB;
  1203.     MBGetFontNameFromLetterPB         getFontNameFromLetterPB;
  1204. };
  1205.  
  1206. /*------------------------------------------------------------------------------*/
  1207. /*    FUNCTION PROTOTYPES                                                           */
  1208. /*------------------------------------------------------------------------------*/
  1209. /**********************************************************/
  1210. /* Mailbox Operations */
  1211. /***********************************************************/
  1212. extern pascal OSErr MBMountMailbox(MailboxParam *mailParam, Boolean async)
  1213.  THREEWORDINLINE(0x3F3C, 0x0578, 0xAA5E);
  1214.  
  1215. extern pascal OSErr MBUnmountMailbox(MailboxParam *mailParam, Boolean async)
  1216.  THREEWORDINLINE(0x3F3C, 0x0579, 0xAA5E);
  1217.  
  1218. /**********************************************************/
  1219. /* MailItem Operations */
  1220. /***********************************************************/
  1221. extern pascal OSErr MBOpenContainer(MailboxParam *mailParam, Boolean async)
  1222.  THREEWORDINLINE(0x3F3C, 0x0582, 0xAA5E);
  1223.  
  1224. extern pascal OSErr MBCloseContainer(MailboxParam *mailParam, Boolean async)
  1225.  THREEWORDINLINE(0x3F3C, 0x0583, 0xAA5E);
  1226.  
  1227. extern pascal OSErr MBReconnectOpenContainer(MailboxParam *mailParam, Boolean async)
  1228.  THREEWORDINLINE(0x3F3C, 0x057F, 0xAA5E);
  1229.  
  1230. extern pascal OSErr MBGetMailItemData(MailboxParam *mailParam, Boolean async)
  1231.  THREEWORDINLINE(0x3F3C, 0x0592, 0xAA5E);
  1232.  
  1233. extern pascal OSErr MBGetMailItemCount(MailboxParam *mailParam, Boolean async)
  1234.  THREEWORDINLINE(0x3F3C, 0x0584, 0xAA5E);
  1235.  
  1236. extern pascal OSErr MBCreateMailItemIterator(MailboxParam *mailParam, Boolean async)
  1237.  THREEWORDINLINE(0x3F3C, 0x0585, 0xAA5E);
  1238.  
  1239. extern pascal OSErr MBDisposeMailItemIterator(MailboxParam *mailParam, Boolean async)
  1240.  THREEWORDINLINE(0x3F3C, 0x0586, 0xAA5E);
  1241.  
  1242. extern pascal OSErr MBMailItemIterate(MailboxParam *mailParam, Boolean async)
  1243.  THREEWORDINLINE(0x3F3C, 0x0587, 0xAA5E);
  1244.  
  1245. extern pascal OSErr MBResetMailItemIterator(MailboxParam *mailParam, Boolean async)
  1246.  THREEWORDINLINE(0x3F3C, 0x0588, 0xAA5E);
  1247.  
  1248. extern pascal OSErr MBMarkLetter(MailboxParam *mailParam, Boolean async)
  1249.  THREEWORDINLINE(0x3F3C, 0x058C, 0xAA5E);
  1250.  
  1251. extern pascal OSErr MBCopyLocal(MailboxParam *mailParam, Boolean async)
  1252.  THREEWORDINLINE(0x3F3C, 0x058D, 0xAA5E);
  1253.  
  1254. extern pascal OSErr MBCopyToFile(MailboxParam *mailParam, Boolean async)
  1255.  THREEWORDINLINE(0x3F3C, 0x058E, 0xAA5E);
  1256.  
  1257. extern pascal OSErr MBCancelCopy(MailboxParam *mailParam, Boolean async)
  1258.  THREEWORDINLINE(0x3F3C, 0x058F, 0xAA5E);
  1259.  
  1260. extern pascal OSErr MBDeleteLetter(MailboxParam *mailParam, Boolean async)
  1261.  THREEWORDINLINE(0x3F3C, 0x0590, 0xAA5E);
  1262.  
  1263. extern pascal OSErr MBSendNow(MailboxParam *mailParam, Boolean async)
  1264.  THREEWORDINLINE(0x3F3C, 0x0591, 0xAA5E);
  1265.  
  1266. /**********************************************************/
  1267. /* MailItem Changes Operations */
  1268. /***********************************************************/
  1269. extern pascal OSErr MBRegisterNotification(MailboxParam *mailParam, Boolean async)
  1270.  THREEWORDINLINE(0x3F3C, 0x0596, 0xAA5E);
  1271.  
  1272. extern pascal OSErr MBUnregisterNotification(MailboxParam *mailParam, Boolean async)
  1273.  THREEWORDINLINE(0x3F3C, 0x0597, 0xAA5E);
  1274.  
  1275. /**********************************************************/
  1276. /* Progress Indicator Operations */
  1277. /**********************************************************/
  1278. extern pascal OSErr MBCreateProgressIndicator(MailboxParam *mailParam, Boolean async)
  1279.  THREEWORDINLINE(0x3F3C, 0x059C, 0xAA5E);
  1280.  
  1281. extern pascal OSErr MBDisposeProgressIndicator(MailboxParam *mailParam, Boolean async)
  1282.  THREEWORDINLINE(0x3F3C, 0x059D, 0xAA5E);
  1283.  
  1284. extern pascal OSErr MBGetCurrentProgress(MailboxParam *mailParam, Boolean async)
  1285.  THREEWORDINLINE(0x3F3C, 0x059E, 0xAA5E);
  1286.  
  1287. /**********************************************************/
  1288. /* Miscellaneous Operations */
  1289. /***********************************************************/
  1290. extern pascal OSErr MBGetLetterSpec(MailboxParam *mailParam, Boolean async)
  1291.  THREEWORDINLINE(0x3F3C, 0x059F, 0xAA5E);
  1292.  
  1293. extern pascal OSErr MBConvertLetterSpec(MailboxParam *mailParam, Boolean async)
  1294.  THREEWORDINLINE(0x3F3C, 0x0599, 0xAA5E);
  1295.  
  1296. extern pascal OSErr MBGetContainerToken(MailboxParam *mailParam, Boolean async)
  1297.  THREEWORDINLINE(0x3F3C, 0x0589, 0xAA5E);
  1298.  
  1299. extern pascal OSErr MBGetContainerDataFromToken(MailboxParam *mailParam, Boolean async)
  1300.  THREEWORDINLINE(0x3F3C, 0x058A, 0xAA5E);
  1301.  
  1302. /**********************************************************/
  1303. /* Contents Operations */
  1304. /***********************************************************/
  1305. extern pascal OSErr MBOpenLetter(MailboxParam *mailParam, Boolean async)
  1306.  THREEWORDINLINE(0x3F3C, 0x05A0, 0xAA5E);
  1307.  
  1308. extern pascal OSErr MBOpenDiskLetter(MailboxParam *mailParam, Boolean async)
  1309.  THREEWORDINLINE(0x3F3C, 0x05A1, 0xAA5E);
  1310.  
  1311. extern pascal OSErr MBCloseLetter(MailboxParam *mailParam, Boolean async)
  1312.  THREEWORDINLINE(0x3F3C, 0x05A2, 0xAA5E);
  1313.  
  1314. extern pascal OSErr MBOpenNestedLetter(MailboxParam *mailParam, Boolean async)
  1315.  THREEWORDINLINE(0x3F3C, 0x05A3, 0xAA5E);
  1316.  
  1317. extern pascal OSErr MBReadEnclosureFSSpec(MailboxParam *mailParam, Boolean async)
  1318.  THREEWORDINLINE(0x3F3C, 0x05A4, 0xAA5E);
  1319.  
  1320. extern pascal OSErr MBReadContentFSSpec(MailboxParam *mailParam, Boolean async)
  1321.  THREEWORDINLINE(0x3F3C, 0x05A5, 0xAA5E);
  1322.  
  1323. extern pascal OSErr MBEnumerateBlocks(MailboxParam *mailParam, Boolean async)
  1324.  THREEWORDINLINE(0x3F3C, 0x05A6, 0xAA5E);
  1325.  
  1326. extern pascal OSErr MBReadRecipients(MailboxParam *mailParam, Boolean async)
  1327.  THREEWORDINLINE(0x3F3C, 0x05A7, 0xAA5E);
  1328.  
  1329. extern pascal OSErr MBReadAttributes(MailboxParam *mailParam, Boolean async)
  1330.  THREEWORDINLINE(0x3F3C, 0x05A8, 0xAA5E);
  1331.  
  1332. extern pascal OSErr MBReadBlock(MailboxParam *mailParam, Boolean async)
  1333.  THREEWORDINLINE(0x3F3C, 0x05A9, 0xAA5E);
  1334.  
  1335. extern pascal OSErr MBVerifySignature(MailboxParam *mailParam, Boolean async)
  1336.  THREEWORDINLINE(0x3F3C, 0x05AA, 0xAA5E);
  1337.  
  1338. extern pascal OSErr MBCreateLetter(MailboxParam *mailParam, Boolean async)
  1339.  THREEWORDINLINE(0x3F3C, 0x05AB, 0xAA5E);
  1340.  
  1341. extern pascal OSErr MBSubmitLetter(MailboxParam *mailParam, Boolean async)
  1342.  THREEWORDINLINE(0x3F3C, 0x05AC, 0xAA5E);
  1343.  
  1344. extern pascal OSErr MBBeginNestedLetter(MailboxParam *mailParam, Boolean async)
  1345.  THREEWORDINLINE(0x3F3C, 0x05AD, 0xAA5E);
  1346.  
  1347. extern pascal OSErr MBEndNestedLetter(MailboxParam *mailParam, Boolean async)
  1348.  THREEWORDINLINE(0x3F3C, 0x05AE, 0xAA5E);
  1349.  
  1350. extern pascal OSErr MBAddAttribute(MailboxParam *mailParam, Boolean async)
  1351.  THREEWORDINLINE(0x3F3C, 0x05AF, 0xAA5E);
  1352.  
  1353. extern pascal OSErr MBAddEnclosure(MailboxParam *mailParam, Boolean async)
  1354.  THREEWORDINLINE(0x3F3C, 0x05B0, 0xAA5E);
  1355.  
  1356. extern pascal OSErr MBAddBlock(MailboxParam *mailParam, Boolean async)
  1357.  THREEWORDINLINE(0x3F3C, 0x05B1, 0xAA5E);
  1358.  
  1359. extern pascal OSErr MBAddLetter(MailboxParam *mailParam, Boolean async)
  1360.  THREEWORDINLINE(0x3F3C, 0x05B2, 0xAA5E);
  1361.  
  1362. extern pascal OSErr MBAddContent(MailboxParam *mailParam, Boolean async)
  1363.  THREEWORDINLINE(0x3F3C, 0x05B3, 0xAA5E);
  1364.  
  1365. extern pascal OSErr MBReadContent(MailboxParam *mailParam, Boolean async)
  1366.  THREEWORDINLINE(0x3F3C, 0x05B4, 0xAA5E);
  1367.  
  1368. extern pascal OSErr MBAddRecipient(MailboxParam *mailParam, Boolean async)
  1369.  THREEWORDINLINE(0x3F3C, 0x05B5, 0xAA5E);
  1370.  
  1371. extern pascal OSErr MBGetFontNameFromLetter(MailboxParam *mailParam, Boolean async)
  1372.  THREEWORDINLINE(0x3F3C, 0x0598, 0xAA5E);
  1373.  
  1374.  
  1375. #if GENERATINGCFM
  1376. #else
  1377. #endif
  1378.  
  1379. enum {
  1380.     uppMBNotificationProcInfo = kPascalStackBased
  1381.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(MBOpenContainerRef)))
  1382.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(MBNotificationMask)))
  1383.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))
  1384.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(MBMailItemData *)))
  1385. };
  1386.  
  1387. #if GENERATINGCFM
  1388. #define NewMBNotificationProc(userRoutine)        \
  1389.         (MBNotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppMBNotificationProcInfo, GetCurrentArchitecture())
  1390. #else
  1391. #define NewMBNotificationProc(userRoutine)        \
  1392.         ((MBNotificationUPP) (userRoutine))
  1393. #endif
  1394.  
  1395. #if GENERATINGCFM
  1396. #define CallMBNotificationProc(userRoutine, containerRef, actualChanges, contextPtr, item)        \
  1397.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppMBNotificationProcInfo, (containerRef), (actualChanges), (contextPtr), (item))
  1398. #else
  1399. #define CallMBNotificationProc(userRoutine, containerRef, actualChanges, contextPtr, item)        \
  1400.         (*(userRoutine))((containerRef), (actualChanges), (contextPtr), (item))
  1401. #endif
  1402. #endif
  1403.  
  1404. #if PRAGMA_ALIGN_SUPPORTED
  1405. #pragma options align=reset
  1406. #endif
  1407.  
  1408. #if PRAGMA_IMPORT_SUPPORTED
  1409. #pragma import off
  1410. #endif
  1411.  
  1412. #ifdef __cplusplus
  1413. }
  1414. #endif
  1415.  
  1416. #endif /* __OCEMAILBOX__ */
  1417.  
  1418.